package com.daliu.controller;

import com.daliu.mapper.UserMapper;
import com.daliu.pojo.po.Role;
import com.daliu.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/role")
public class RoleController {

    @Autowired
    private UserService service;

    @GetMapping("/findAll")
    public List<Role> findAll(){
        return service.findALl();
    }

}
